package org.eclipse.mylyn.rememberthemilk.core.client;

import java.io.Serializable;
import java.util.HashMap;

import com.mdt.rtm.data.RtmLists;
import com.mdt.rtm.data.RtmTaskList;
import com.mdt.rtm.data.RtmTaskSeries;
import com.mdt.rtm.data.RtmTasks;


	
public class RTMClientData implements Serializable {

	private static final long serialVersionUID = -3941519063218415764L;
	
	public RtmLists rtmLists;
	
	long lastUpdate;
	
	HashMap<String, RtmTaskSeries> rtmSeries;
	
	public RTMClientData() {
		rtmSeries = new HashMap<String, RtmTaskSeries>();
	}

	void addTasks(RtmTasks lists) {
		if (rtmSeries == null) {
			rtmSeries = new HashMap<String, RtmTaskSeries>();
		}
		for (RtmTaskList list : lists.getLists()) {
			for (RtmTaskSeries series : list.getSeries()) {
				rtmSeries.put(series.getId(), series);
			}
		}
	}

}


